import { deepFreeze } from "./freezeObject";

export const appConfig = deepFreeze({
    baseUrl: {
        default: process.env.VUE_APP_BASE_URL,
        system: process.env.VUE_APP_SYSTEM_BASE_URL,
        files: process.env.VUE_APP_FILE_URL,
    },
    // 内网地  ---- > 不在env配置
    ownOnLine: {
        own_dev: "",
        own_prod: "",
        own_files: "",
    },
    // token 配置
    token: {
        key: "Authorization",
        value: "Bearer TOKEN",
        // token 超时时间  6 天
        expires: 6 * 24 * 3600 * 1000,
    },
    // 合并路由 --> true: 单独模块  false --- > 多模块
    mergeRoutes: true,
    // 存储 前缀
    storagePrefix: "admin-",
    // 存储方式
    storageType: "localStorage",
    // 菜单样式 -- > 预留
    menuStyle: {},
    // 版本  -- > 预留
    apiVersion: "",
    // 接口根路径  -- > 预留
    api: '',
    // 生成密钥位数 1024 格式：PKCS#8   输出格式: PEM/Base64
    encryPublicKey:
        "-----BEGIN PUBLIC KEY-----" +
        "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCoH2QMROMwBVQxZMPG9eWU2d1s" +
        "qL3Y5kaWmw2ynuXwuI5sovR8kK2XynLykidyob3PMVq2UZJVYWToaJ+qh1IkqacK" +
        "lFASMr7kek0nTLBxgZ23BJoYMmFkZuAq3Rz8JO//QDKISdfTAfNUGIZ3CafG5w+D" +
        "d75tdsa1omDwP6ltBQIDAQAB" +
        "-----END PUBLIC KEY-----",
    encryPrivateKey:
        "-----BEGIN RSA PRIVATE KEY-----" +
        "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKgfZAxE4zAFVDFk" +
        "w8b15ZTZ3WyovdjmRpabDbKe5fC4jmyi9HyQrZfKcvKSJ3Khvc8xWrZRklVhZOho" +
        "n6qHUiSppwqUUBIyvuR6TSdMsHGBnbcEmhgyYWRm4CrdHPwk7/9AMohJ19MB81QY" +
        "hncJp8bnD4N3vm12xrWiYPA/qW0FAgMBAAECgYEAn73j0/yIWRJXIu95TcxKrZos" +
        "V5glereiDmuZIkT0ejsBqJtU7h6Rso47ldvk+3hO31Unud/byKBXvrPaMa+ODZky" +
        "2Pgmsu671Iz53xSChYvfJXdgq1rzwxL1nvwh+pBDmEMGZ7YLp2tmcz+PdSaw6SSW" +
        "So6lbYcxciYsco0v08ECQQDZTYAtkbmw17FCppD5oVcGVHwmNo/WmPiKuc+rDvNO" +
        "gVrNO3Pm+VRrLwSlRaj1BUnbnQyHQRuujdnnzuPIX2TZAkEAxg/YBgjiX1NNEJn7" +
        "dOdIZrpBfmKZu9SqBoZE47nDAUcZcOgnOLdZu4EhwDgDMh6WcgF0BEOdbKFfx6Ia" +
        "kZL+DQJAevUCcUaC1tDFaVxMriOf1WIauZin/RqjkAOhwT39aE+DbJuWcnxkSx3Y" +
        "uBfZiYMLjqunuiSaIEP9p9AGTYvEyQJAehzOnXngx9D+FJw7Uqo+E0gGlTuJeSr2" +
        "4SrrUlP3jNQfNWOMuwUgR+CnxHFEVyRQsV2AABkH+C/Oc7DYHKS6CQJAT/rgPS0F" +
        "02eWX1jQECpISjqxGmAK+VphDFl3xf7dGUcg1hJil5Ok0JGoqW/MEIIR/CwXqVHB" +
        "7OhMhnHFUIdpnQ==" +
        "-----END RSA PRIVATE KEY-----",
});

export const settingConfig = deepFreeze({
    // indexDB配置项
    indexedDBDataSource: "adminDataSource",
    indexedDBDataTable: "adminDataTable",
    // 页面name
    loginName: "UserLogin",
    mainName: "LayoutHome",
    homeName: "HomeMain",
    error404: "error404Home",
    auth403Name: "auth403",
    kanBanName: 'Kanban'
});
